<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>resume-management</title>
    <link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/biz/login-register.css">
    <script src="${contextPath}/resources/js/lib/jquery-1.11.3.js"></script>
    <script src="${contextPath}/resources/js/lib/bootstrap.js"></script>
    <script src="${contextPath}/resources/js/biz/login-register.js"></script>
</head>

<body>
    <nav class="navbar navbar-default">
        <div class="container">
            <ol class="breadcrumb">
                <li class="active">简历平台</li>
                <li class="active">企业用户</li>
            </ol>
        </div>
        </div>
    </nav>
    <div class="container">
        <div class="row">
            <div class="col-md-6 col-md-offset-3">
                <div class="panel panel-login">
                    <div class="panel-heading">
                        <div class="row">
                            <div class="col-xs-6">
                                <a href="#" class="active" id="login-form-link">Login</a>
                            </div>
                            <div class="col-xs-6">
                                <a href="#" id="register-form-link">Register</a>
                            </div>
                        </div>
                        <hr>
                    </div>
                    <#if error??>
                        <div class="alert alert-warning alert-dismissible">
                            <button class="close" data-dismiss="alert"><span>&times;</span></button>
                            <strong>Warning!</strong> ${error}
                        </div>
                    </#if>
                    <#if msg??>
                        <div class="alert alert-info alert-dismissible">
                            <button class="close" data-dismiss="alert"><span>&times;</span></button>
                            <strong>Info!</strong> ${msg}
                        </div>
                    </#if>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-lg-12">
                                <form id="login-form" action="${contextPath}/company/login" method="post" style="display: block;">
                                    <div class="form-group">
                                        <input type="text" name="name" class="form-control" placeholder="Username" required>
                                    </div>
                                    <div class="form-group">
                                        <input type="password" name="pwd" class="form-control" placeholder="Password" required>
                                    </div>
                                    <div class="form-group">
                                        <div class="row">
                                            <div class="col-sm-6 col-sm-offset-3">
                                                <input type="submit" class="form-control btn btn-login" value="Log In">
                                            </div>
                                        </div>
                                    </div>
                                </form>
                                <form id="register-form" class="form-horizontal" action="${contextPath}/company/register" method="post" style="display: none;">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">Username</label>
                                        <div class="col-sm-10">
                                            <input class="form-control" type="text" class="form-control" name="name" required>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">Password</label>
                                        <div class="col-sm-10">
                                            <input type="password" class="form-control" name="pwd" required>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">Address</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" name="address" required>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">Phone</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" name="phone" required>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">Website</label>
                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" name="website" required>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="row">
                                            <div class="col-sm-6 col-sm-offset-3">
                                                <input type="submit" class="form-control btn btn-register" value="Register Now">
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
    var current<#if current??> = "${current}"</#if>;
    if (current && current == 'register') {
        $("#register-form").delay(100).fadeIn(100);
        $("#login-form").fadeOut(100);
        $('#login-form-link').removeClass('active');
        $('#register-form-link').addClass('active');
    }
    </script>
</body>

</html>
